package com.jintian.smart.kernel.job.mapper;

import com.jintian.smart.kernel.job.domain.entity.SmartJobEntity;
import com.jintian.smart.kernel.job.domain.form.SmartJobQueryForm;
import com.jintian.smart.kernel.job.domain.vo.SmartJobVO;
import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;

import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

/**
 * 定时任务 dao
 */
@Mapper
@SqlResource("job.SmartJob")
public interface SmartJobMapper extends IBaseExtMapper<SmartJobEntity> {
    /**
     * 定时任务-分页查询
     *
     * @param queryForm
     * @return
     */
    PageResult<SmartJobVO> query(@Param("queryForm") SmartJobQueryForm queryForm);

    /**
     * 假删除
     *
     * @param jobId
     * @return
     */
    void updateDeletedFlag(@Param("jobId") Integer jobId, @Param("deletedFlag") Boolean deletedFlag);

    /**
     * 根据 任务class 查找
     *
     * @param jobClass
     * @return
     */
    SmartJobEntity selectByJobClass(@Param("jobClass") String jobClass);
}
